]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Correct hot corner barriers in RTL layouts
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 20 Apr 2013 15:48:28 +0000 (11:48 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Fri, 26 Apr 2013 15:23:37 +0000 (11:23 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=698884

js/ui/layout.js

index a7356a0248cf9bf15d6e0dc2ff1a82cc2942d679..d4dc293c294feb9c9c69286500134e78b825e856 100644 (file)
@@ -1096,12 +1096,21 @@ const HotCorner = new Lang.Class({
         }
 
         if (size > 0) {
-            this._verticalBarrier = new Meta.Barrier({ display: global.display,
-                                                       x1: this._x, x2: this._x, y1: this._y, y2: this._y + size,
-                                                       directions: Meta.BarrierDirection.POSITIVE_X });
-            this._horizontalBarrier = new Meta.Barrier({ display: global.display,
-                                                         x1: this._x, x2: this._x + size, y1: this._y, y2: this._y,
-                                                         directions: Meta.BarrierDirection.POSITIVE_Y });
+            if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) {
+                this._verticalBarrier = new Meta.Barrier({ display: global.display,
+                                                           x1: this._x, x2: this._x, y1: this._y, y2: this._y + size,
+                                                           directions: Meta.BarrierDirection.NEGATIVE_X });
+                this._horizontalBarrier = new Meta.Barrier({ display: global.display,
+                                                             x1: this._x - size, x2: this._x, y1: this._y, y2: this._y,
+                                                             directions: Meta.BarrierDirection.POSITIVE_Y });
+            } else {
+                this._verticalBarrier = new Meta.Barrier({ display: global.display,
+                                                           x1: this._x, x2: this._x, y1: this._y, y2: this._y + size,
+                                                           directions: Meta.BarrierDirection.POSITIVE_X });
+                this._horizontalBarrier = new Meta.Barrier({ display: global.display,
+                                                             x1: this._x, x2: this._x + size, y1: this._y, y2: this._y,
+                                                             directions: Meta.BarrierDirection.POSITIVE_Y });
+            }
 
             this._pressureBarrier.addBarrier(this._verticalBarrier);
             this._pressureBarrier.addBarrier(this._horizontalBarrier);